//
//  BinaryClockAppDelegate.m
//  BinaryClock
//
//  Created by Peter Elst on 7/18/08.
//  Copyright Peter Elst 2008. All rights reserved.
//

#import "BinaryClockAppDelegate.h"
#import "BinaryClockViewController.h"
#import "TrueBinaryClockViewController.h"

@implementation BinaryClockAppDelegate

@synthesize window;
@synthesize viewController;
@synthesize view2Controller;

NSString *currentWindow;

- (void)applicationDidFinishLaunching:(UIApplication *)application {	
	[window addSubview:viewController.view];
	[window makeKeyAndVisible];
	currentWindow = @"view1";
}

- (void)toggleView {
	if(currentWindow == @"view1") {
		[window addSubview: view2Controller.view];
		currentWindow = @"view2";
	} else {
		[window addSubview: viewController.view];
		currentWindow = @"view1";
	}
	[window makeKeyAndVisible];
}

- (void)dealloc {
    [viewController release];
    [view2Controller release];
	[window release];
	[super dealloc];
}


@end
